from datetime import  datetime
from django.db import models

# Create your models here.
class SendResult(models.Model):
    id = models.AutoField( verbose_name='id', primary_key=True)
    template_id = models.CharField(max_length=150, verbose_name='模板id', default='')
    template_code = models.CharField(max_length=150, verbose_name='模板code', default='')
    sign_name = models.CharField(max_length=150, verbose_name='短信签名', default='')
    template = models.CharField(max_length=500, verbose_name='短信模板', default='')
    request_id = models.CharField(max_length=150, verbose_name='请求id', default='')
    message = models.CharField(max_length=150, verbose_name='状态码描述', default='')
    code = models.CharField(max_length=150, verbose_name='状态码', default='')
    biz_id = models.CharField(max_length=150, verbose_name='发送回执ID', default='')
    create_time = models.DateTimeField(default=datetime.now, blank=True, verbose_name='短信发送时间')
    mobile = models.TextField(verbose_name='手机号', max_length=130000,default='')
    mobile_len = models.IntegerField(default='0',verbose_name="发送数量")
    companyinfo = models.CharField(max_length=150, verbose_name='操作页面', default='')


    class Meta:
        verbose_name = '短信回执备份'
        verbose_name_plural = verbose_name

    def __str__(self):
        return str(self.id)

